import pymysql
#-*- coding: utf-8 -*-
# import sqlite3
class sql_information():

    def query_data(self,sql):
        connection = pymysql.connect('localhost', 'root', 'root', "flight_plan")
        # connection = sqlite3.connect('stowage.db')
        cursor = connection.cursor()
        try:
            cursor.execute(sql)
            query_data = cursor.fetchall()

        except Exception as e:
            print(e)
        finally:
            if connection:
                cursor.close()
            if cursor:
                connection.close()

        return query_data
